package com.smart.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.smart.common.PageInfo;
import com.smart.model.domain.ProjectReportDO;
import com.smart.model.request.ProjectReportRequest;
import com.smart.model.vo.ProjectItemVO;
import com.smart.model.vo.ProjectReportVO;
import com.smart.model.vo.ProjectWeeklyItemVO;

import java.util.List;

/**
 * @author zhanghong
 */
public interface ProjectReportService extends IService<ProjectReportDO> {

    /**
     * 根据主键查询
     * @param id
     * @return
     */
     ProjectReportVO getByKey(long id);
    /**
     * 分页查询，手动分页
     * @param request
     * @return
     */
    PageInfo<ProjectReportVO> tempPageQuery(ProjectReportRequest request);
    /**
     * 分页查询，手动分页
     * @param request
     * @return
     */
    PageInfo<ProjectReportVO> weeklyPageQuery(ProjectReportRequest request);
    /**
     * 列表查询
     * @param request
     * @return
     */
    List<ProjectReportVO> listQuery(ProjectReportRequest request);
    /**
     * 新增
     * @param request
     * @return
     */
    Boolean add(ProjectReportRequest request);
    /**
     * 根据主键更新
     * @param request
     * @return
     */
    Boolean updateByKey(ProjectReportRequest request);
    /**
     * 根据主键删除
     * @param id
     * @return
     */
    Boolean deleteByKey(long id);

    /**
     * 生成周报任务
     * @param projectId
     * @return
     */
    boolean createWeeklyTask(Long projectId);
    /**
     * 查询提报项列表
     * @param id
     * @return
     */
    List<ProjectItemVO> queryReportItem(Long id);

    /**
     * 查询周报提报项
     * @param id
     * @return
     */
    List<ProjectWeeklyItemVO> queryWeeklyReportItem(Long id);

    /**
     * 状态变更需要添加周报任务
     * @return
     */
    Boolean projectStatusChangeAdd(Long projectId, String projectStatus);
}
